﻿using System;
using System.Collections.Generic;
using VDS.RDF.Query;

namespace VirtuosoDal.Helpers
{
   internal static class UriEnumerationHelper
   {
      public static string GetUriEnumerationString(int urisCount)
      {
         string urisEnumerationString = String.Empty;

         for (int i = 0; i < urisCount; i++)
         {
            urisEnumerationString += String.Format("@uri{0}", i);
            if (i != urisCount - 1)
               urisEnumerationString += ", ";
         }

         return urisEnumerationString;
      }

      public static void FillUriEnumerationStringParameters(SparqlParameterizedString sparqlParameterizedString,
                                                   List<string> uris)
      {
         for (int i = 0; i < uris.Count; i++)
            sparqlParameterizedString.SetUri(String.Format("@uri{0}", i), new Uri(uris[i]));
      }
   }
}